Skip to main content

JS Calculators

What is JS Calculators?

In JS calculators you can create variables that you will use later for requests or in manifests.

How to create a JS Calculator?

  1. Go to "Decision node", click on it and on the right side you will see additional window.
  2. In JS Calculators tab press + button, and you will see the following window:

img_13.png

  1. Write Target Variable Name (ex. $.orderNumber)

  2. Choose JS Libraries from dropdown (if any, not required) more info about JS Libraries

  3. Choose Code or Expression

  4. And write JS code and hit Confirm, after click "Save node" button.

img_14.png

What is 'Run Before Request'?

If you click 'Run Before Request' checkbox it will be executed before you make any API request.

For example: If I am working with ticketing system API (let's say Zendesk). And I want to send internal node to the ticket.

I have an API to update Zendesk ticket with an Internal node.

So while making a request the variable $.intenalNote will be executed before you make an API request.

img_15.png